package com.paas.form.core.element.constants;

public class ServiceConstant {

    public static final String VM_SERVICE = "import BaseService from \"@/service/BaseService\";\n" +
            "/**\n" +
            " * 描述:表单服务\n" +
            " */\n" +
            "class ${classNameUtU}Service extends BaseService {\n" +
            "  /*\n" +
            "   * 描述：描述根据模板插入信息\n" +
            "   */\n" +
            "  save(params) {\n" +
            "    return this.postAction(this.getModulePath() + `/save`, params);\n" +
            "  }\n" +
            "  saveBatch(params) {\n" +
            "    return this.postAction(this.getModulePath() + `/saveBatch`, params);\n" +
            "  }\n" +
            "  delete(params) {\n" +
            "    return this.postAction(this.getModulePath() + `/delete`, params);\n" +
            "  }\n" +
            "  delectById(params) {\n" +
            "    return this.getAction(this.getModulePath() + `/deleteById`, params);\n" +
            "  }\n" +
            "  deleteBatchByIds(params) {\n" +
            "    return this.postAction(this.getModulePath() + `/deleteBatchByIds`, params);\n" +
            "  }\n" +
            "  queryById(params) {\n" +
            "    return this.getAction(this.getModulePath() + `/queryById`, params);\n" +
            "  }\n" +
            "  queryBatchByIds(params) {\n" +
            "    return this.postAction(this.getModulePath() + `/queryBatchByIds`, params);\n" +
            "  }\n" +
            "  queryPage(params) {\n" +
            "    return this.getAction(this.getModulePath() + `/queryPage`, params);\n" +
            "  }\n" +
            "  queryList(params) {\n" +
            "    return this.getAction(this.getModulePath() + `/queryList`, params);\n" +
            "  }\n" +
            "  \n" +
            "  /**\n" +
            "   * 描述:获取host地址\n" +
            "   * @returns {string}\n" +
            "   */\n" +
            "  getBaseUrl() {\n" +
            "    return this.serviceConfig.getBaseUrl(\"dev\");\n" +
            "  }\n" +
            "  getBaseUrlOauth() {\n" +
            "    return this.serviceConfig.getBaseUrl(\"oauth\");\n" +
            "  }\n" +
            "  /**\n" +
            "   * 描述:获取模块地址\n" +
            "   * @returns {string}\n" +
            "   */\n" +
            "  getModulePath() {\n" +
            "    return \"/${module}/${className}\";\n" +
            "  }\n" +
            "}\n" +
            "export default new ${classNameUtU}Service();\n";



}
